//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.tuiofx.internal.test;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.Pane;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;
import org.tuiofx.Configuration;
import org.tuiofx.TuioFX;

public class SceneChangeExplore extends Application {
    public SceneChangeExplore() {
    }

    public static void main(String[] args) {
        launch(args);
    }

    public void start(final Stage primaryStage) {
        Pane root1 = new Pane();
        Pane root2 = new Pane();
        final Scene scene1 = new Scene(root1, 800.0, 680.0);
        final Scene scene2 = new Scene(root2, 800.0, 680.0);
        Button b1 = new Button("To Scene 1");
        b1.setFont(Font.font("Helvetica", FontWeight.BLACK, 150.0));
        b1.setOnAction(new EventHandler<ActionEvent>() {
            public void handle(ActionEvent event) {
                primaryStage.setScene(scene2);
                primaryStage.setFullScreen(false);
            }
        });
        root1.getChildren().add(b1);
        Button b2 = new Button("To Scene 2");
        b2.setFont(Font.font("Helvetica", FontWeight.BLACK, 150.0));
        b2.setOnAction(new EventHandler<ActionEvent>() {
            public void handle(ActionEvent event) {
                primaryStage.setScene(scene1);
                primaryStage.setFullScreen(false);
            }
        });
        root2.getChildren().add(b2);
        TuioFX tuiofx = new TuioFX(primaryStage, Configuration.ioS());
        tuiofx.start();
        primaryStage.setTitle("Hello TUIOFX");
        primaryStage.setScene(scene1);
        primaryStage.setFullScreen(false);
        primaryStage.show();
    }
}
